<div class="panel-body">
    <div class="table-responsive">
        <table class="table table-striped table-hover">
            <thead>
            <tr>
                <g:sortableColumn property="name" title="名称"/>
                <g:sortableColumn property="status" title="状态"/>
                <g:sortableColumn property="user" title="执行人"/>
                <g:sortableColumn property="endTime" title="计划完成时间"/>
                <g:sortableColumn property="actualEndTime" title="实际完成时间"/>
                <g:sortableColumn  class="text-center" width="15%" colspan="2" property="active" title="操作"/>
            </tr>
            </thead>
            <tbody>
            <g:each in="${taskList}">
                <tr>
                    <td><g:link action="show" controller="activity" id="${it?.id}"
                                class="firstTd">${it?.name}</g:link></td>
                    <td>${it?.status}</td>
                    <td>${it?.user?.fullName}</td>
                    <td><g:formatDate date="${it?.endTime}"
                                      format="yyyy-MM-dd HH:mm:ss"></g:formatDate></td>
                    <td><g:formatDate date="${it?.actualEndTime}"
                                      format="yyyy-MM-dd HH:mm:ss"></g:formatDate></td>
                    <td class="text-center">
                        <g:link class="btn btn-xs btn-link ${this.activityPermission?.name == 'Read' ? 'disabled' : ''}"
                                controller="activity" action="edit"
                                id="${it?.id}">
                            <i class="fa fa-edit"></i>
                            编辑
                        </g:link>

                    </td>
                    <td class="text-center">
                        <g:form resource="${it}" method="DELETE">
                            <button class="deleteBtn btn btn-xs btn-link ${this.activityPermission?.name == 'Read' ? 'disabled' : ''}" type="button"><i
                                    class="fa fa-trash-o"></i> 删除</button>
                        </g:form>
                    </td>
                </tr>
            </g:each>
            </tbody>
        </table>
    </div>
</div>